# 递归查找所有源文件
file(GLOB_RECURSE srcs
     ${CMAKE_CURRENT_SOURCE_DIR}/*.c
     ${CMAKE_CURRENT_SOURCE_DIR}/task/*.c
     ${CMAKE_CURRENT_SOURCE_DIR}/BSP/*.c
     ${CMAKE_CURRENT_SOURCE_DIR}/SPI/*.c
     )

# 设置头文件目录
set(include_dirs
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/task
    ${CMAKE_CURRENT_SOURCE_DIR}/BSP
    ${CMAKE_CURRENT_SOURCE_DIR}/SPI
    )


# 注册组件
idf_component_register(
    SRCS ${srcs}
    INCLUDE_DIRS ${include_dirs}
    )
